<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'index.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="<%=basePath%>pages/news/first_page/style/backstage.css" media="all" />
		<script type="text/javascript" charset="utf-8"
			src="<%=basePath%>/pages/news/kindeditor/kindeditor.js"></script>
		<script type="text/javascript" charset="utf-8"
			src="<%=basePath%>/pages/news/kindeditor/preview.js"></script>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/pages/news/kindeditor/skins/preview.css">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
 </style>
	</head>
	<body>
		<fieldset class="fieldset">
		<legend class="legend">新建新闻：</legend>
		<form name="example" method="post"
			action="<%=basePath%>news_view/addnews" class="form">
			新闻标题：
			<input type="text" name="news.newsTitle">
			&nbsp;&nbsp;
			新闻类型：<select name='newsType.id' class="form1">
			<c:forEach var="newtype" items="${newsType}">
				<option value="${newtype.id }">
					${newtype.typeText }
				</option>
			</c:forEach>
			</select><br /><br />
			<div class="editor">
			<textarea id="content1" name="news.newText" cols="380" rows="20"
				style="width: 700px; height: 200px; visibility: hidden;"></textarea>
			</div>
			<br />
			<input type="submit" name="button" value="提交内容" class="button1"/>
			(提交快捷键: Ctrl + Enter)
		</form>
		</fieldset>
<script type="text/javascript">
		KE.show({
			id : 'content1',
			items : [
				 		'source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
				 		'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
				 		'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
				 		'superscript', '|', 'selectall', '-',
				 		'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
				 		'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
				 		'flash', 'media', 'advtable', 'hr', 'emoticons', 'link', 'unlink', '|', 'about','preview'
				 	],
			imageUploadJson : '<%=path%>/pages/news/kindeditor/upload_json.jsp',
			fileManagerJson : '<%=path%>/pages/news/kindeditor/file_manager_json.jsp',
			allowFileManager : true,
			afterCreate : function(id) {
				KE.event.ctrl(document, 13, function() {
					KE.util.setData(id);
					document.forms['example'].submit();
				});
				KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
					KE.util.setData(id);
					document.forms['example'].submit();
				});
			}
		});
</script>
	</body>
</html>
